<div class="cont-maindear">
	<div class="mainimg">
		<a class="setDealWh" href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>">
			<div class="v7price_promotion fixPNG mLeft400 mTop10">
				<?= $product->save ?><span>%</span>
			</div>
			<img src="<?= image_url($product->image) ?>" alt="<? $product->info[$lang]->name ?>" title="<? $product->info[$lang]->name ?>">
		</a>
	</div>
	<div class="right-contdear width256">
		<div class="title-maindear">
			<div class="v6TitleShort">
				<div class="fl">
					<a title="<?= $product->info[$lang]->name ?>" href="<?= url_create('site', 'ViewProduct', 'index', $product->id) ?>">
						<h1><?= $product->info[$lang]->name ?></h1>
					</a>
				</div>
				<div class="c"></div>
			</div>
		</div>
		<div class="boxPrices">
			<div class="boxPrices_view fixPNG width283">

				<div align="center" class="v6Price mTop10">
					<?= currency_format($product->sale_price) ?><span>đ</span>
				</div>
				<div align="center" class="pricebuys"><span><?= currency_format($product->price) ?>đ</span>&nbsp;&nbsp;(<b><?= $product->save ?>%</b>)</div>
				<div class="v6BuyNow">
					<a href="javascript:void(0)" class="<?= $product->active == 0 ? 'v6Out ' : '' ?>fixPng"></a>
				</div>
			</div>
		</div>
		<div class="v6BorderBot">
			<div class="v6BottomPrice">
				<div class="v6Buyersnew mTop10">
					<? $orders_count = count($product->orders); ?>
					<?= lang('orders_stats', $orders_count) ?>
					<div class="mainBlueBoxNew pTop10">
						<ul class="firstList">
							<?
							foreach ($product->orders as $index => $order) {
								if ($index > 4)
									break;
								?>
								<li id="customer<?= $product->id ?>_1">
									<span><?= $orders_count - $index ?>. </span>
									<a><?= $order->fullname ?></a>
								</li>
							<? } ?>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div style="border-bottom:none" class="v6BorderBot pTop5">
			<div class="v6Timer">
				<div class="v6Gray fl"><?= lang('timeleft') ?></div>
				<div class="v6DisplayTime"><span time="<?= $product->end ?>"></span></div>
			</div>
			<div class="c"></div>
		</div>
	</div>
	<div class="c"></div>
	<div class="bottomTopDeal"></div>
	<script src="<?= base_url() ?>javascript/jquery/kkcountdown.min.js"></script>
	<script>
<? if ($product->active) { ?>
				$(".v6DisplayTime span").kkcountdown({
					dayText		: ' <?= lang('day') ?> ',
					daysText 	: ' <?= lang('day') ?> ',
					hoursText	: ':',
					minutesText	: '’:',
					secondsText	: '”',
					displayZeroDays : false
				});
<? } ?>
			$('.v6BuyNow a').click(function(){
				if($(this).hasClass('v6Out')){
					message_box('<span style="font-size:14px;color:red">Rất tiếc! Đã quá thời hạn bán sản phẩm.<br>Xin Quý khách vui lòng chọn sản phẩm khác.</span>');
					return;
				}
				$('#cartRegisterForm [name="product_id"]').val('<?= $product->id ?>');
				open_popup('formPayment');
			});
		
	</script>
</div>